#include "Planet.h"

Planet::Planet( void ) : BaseMeshEntity()
{

}

Planet::Planet( IDirect3DDevice9 *nDevice, D3DXVECTOR3 nPosition, D3DXVECTOR3 nScale, D3DXVECTOR3 RotationSpeed)
	:BaseMeshEntity(nDevice)
{
	Angles = D3DXVECTOR3(0,0,0);
	Position = nPosition;
	Scale = nScale;
	AngularVelocity = RotationSpeed;
}

Planet::~Planet()
{

}

void Planet::Update(float dt)
{
	Angles += AngularVelocity * dt;
	BaseMeshEntity::Update(dt);
	MainSphere.Position = Position;
}

void Planet::SetScale( D3DXVECTOR3 nScale )
{
	Scale = nScale;
}

void Planet::SetAngles( D3DXVECTOR3 nAngles )
{
	Angles = nAngles;
}

void Planet::SetAngularVelocity( D3DXVECTOR3 nAngularVelocity )
{
	AngularVelocity = nAngularVelocity;
}

D3DXVECTOR3 Planet::GetAngles( void )
{
	return Angles;
}

D3DXVECTOR3 Planet::GetScale( void )
{
	return Scale;
}

void Planet::SetCollisionSphere( float nRadius )
{
	MainSphere.Radius = nRadius;
}

D3DXVECTOR3 Planet::GetAngularVelocity( void )
{
	return AngularVelocity;
}